#pragma once
#include "agentstate.h"
#include "FollowWayPointsState.h"

class SearchToWayPointsState :
	public AgentState
{
private:
	FollowWayPointsState* follow_way_points_state;

	vector <Vector2 (*)(Agent* agent, bool* stateChanged)> _waypoints;
	int cur_waypoint;

	void setNextWayPoint();
	bool _done;
	bool _initialized;

protected:
	virtual void add_waypoint_methods() = 0;
	void add_waypoint_method(Vector2 (*func)(Agent* agent, bool* stateChanged));

public:
	SearchToWayPointsState(void);
	~SearchToWayPointsState(void);
	Command GetCommand(Agent* agent);
	bool done();
};

